package com.dc.entity.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dc.entity.WorkOrderFile;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 报修工单表
 *
 * @author feishaobin
 * @email
 * @date 2021-12-17 11:14:50
 */
@Data
@ApiModel
public class RepairVO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "工单类型 0:全部 1:维保 2:报修 3:隐患 4:巡检 5:火警")
    private Integer type;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "报告人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long reportUserId;

    @ApiModelProperty(value = "报告人姓名")
    @Excel(name = "上报人")
    private String reportUserName;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "上报时间")
    @Excel(name = "上报时间", exportFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "设备唯一序列号")
    @Excel(name = "设备编号")
    private String serialNumber;

    @ApiModelProperty(value = "设备名称")
    @Excel(name = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "设备型号")
    @Excel(name = "设备型号")
    private String deviceModel;

    @ApiModelProperty(value = "区域id")
    private String regionId;

    @ApiModelProperty(value = "区域地址")
    @Excel(name = "上报位置")
    private String regionName;

    @ApiModelProperty(value = "工单编号")
    @Excel(name = "工单编号")
    private String number;

    @ApiModelProperty(value = "故障描述")
    @Excel(name = "故障描述")
    private String description;

    @ApiModelProperty(value = "维修人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @ApiModelProperty(value = "维修人姓名")
    private String userName;

    @ApiModelProperty(value = "联系方式")
    private String mobile;

    @ApiModelProperty(value = "维修时间")
    private Date repairTime;

    @ApiModelProperty(value = "工单状态 0：待处理 1：处理中 2：已完成")
    @Excel(name = "状态", replace = {"待处理_0", "处理中_1", "已完成_2"})
    private Integer status;

    @ApiModelProperty(value = "维修内容")
    private String repairContent;

    @ApiModelProperty(value = "值班人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long dutyUserId;

    @ApiModelProperty(value = "值班人姓名")
    private String dutyUserName;

    @ApiModelProperty(value = "维修结果 0：已完成 1：未完成")
    private Integer repairStatus;

    @ApiModelProperty(value = "设备状态 0:正常 1:故障")
    private Integer deviceStatus;

    @ApiModelProperty(value = "维修信息记录")
    private String repairRecord;

    @ApiModelProperty(value = "上报形式   0:系统  1：人工")
    private Integer repairType;

    @TableField(exist = false)
    @ApiModelProperty(value = "附件信息")
    private List<WorkOrderFile> Files;

}
